FIG. 1 illustrates principles of an existing account processing system. The account processing system includes an account processing center 11 and several clients 12. Account processing center 11 can reach client 12 through a dedicated line or network (internet or intranet). There can be multiple clients 12. Client 12 can be an independent terminal or an intranet composed by several terminals. Account processing center 11 includes at least a server 21 and a database 22. Database 22 is configured to store accounts information and various processing information. Server 21 is configured to conduct various operations and managements of accounts.
In an example where account processing center 11 is a third-party payment platform, when client 12 sends an instruction to account processing center 11 to pay fund in account A to several other accounts (such as account B1, B2, B3, Bn) of which payment amount is S1, S2, S3, Sn, respectively, the existing payment process is described below.
Firstly, account processing center 11 receives a request for payment operation from client 12.
Then payment account processing center 11 processes one payment operation.
Server 21 locks account A and determines whether the balance in account A is higher than amount S1. If the balance in account A is higher than S1, server 21 deducts amount S1 from the balance of account A and unlocks account A. It then locks account B1, adds amount S1 into account B1, and unlocks account B1 after completion of the payment operation.
Thus, account processing center 11 needs to perform the operation n times to complete the payment.
In other words, to prevent account parallel processing from impacting the balance in an account, there shall be only one operation affecting the account at one time. It is generally realized by locking the account, e.g., every operation on the account requires firstly determining whether the lock of the account can be obtained. If the lock can be obtained, it is assumed that there are no other operations on the same account so that the current operation can be implemented on the account. Otherwise, it is assumed that there are other operations on the same account so that a wait is required. When there are multiple waiting operations, a queue for waiting process is formed. Every operation in the queue for waiting process requires locking and unlocking of the account. The server can only serially process these operations, thus requiring lots of resources. Especially, when there are several such accounts (e.g., the accounts having a queue for waiting process) or there are a large number of operations to be processed in the queue for waiting process, collapse of the system can easily occur. Assuming the largest number of connections of the database is 100, e.g., the largest number of parallel data access is 100, when there are 100 operations in the queue for waiting process, the whole system cannot accept any new request for account operation. Thus a low efficiency of later new account operations results and collapse of the whole system will easily occur.
The existence of some unexpected events causes abnormal operation on one or more accounts. Quite commonly, an unexpected event is the sharp increase in operations on an account. This arises from a sharp increase of operations to be processed in the queue for waiting process and thereby lowers the efficiency of the whole system.
Some of the unexpected events are caused by instability or technical reasons of the system. Some are human-made. For example, each merchant has its credit rating in the online trading process. The credit rating is a representation of satisfaction of the buyer or other users regarding the service or products of the merchant. Users cannot experience the product in the context of online trading and so that the credit rating is very important for the merchant. It is called credit cheating to conduct some false trading to obtain higher credit rating. When some merchants form a group of merchant cheating, there can be frequent operations on the accounts of such merchants. It costs lots of resources of the system to process such operations and affects the normal operation on other accounts.
In other words, the existing account processing operation of the account processing center has some technical pitfalls as discussed below.
The existing payment process requires frequent operations on account A. Each operation requires locking account A and unlocking account A before and after completion of the operation, respectively. This causes not only low processing efficiency of server 21 but also a sharp reduction of processing capabilities of server 21 such that it cannot even receive processing requests sent by other clients and, if serious, collapse of server 21 may result.
Specifically, when there are relatively high amount of requests to batch process the accounts or there are many accounts to be processed in such batch processing, a high operation burden is placed on server 21. This can easily cause traffic of queue for requesting processing at server 21 and rising failure rates of processing requests, thus affecting other users' experience.